home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / admin / linuxcon.6 / linuxcon / usr / lib / linuxconf / mailconf / rulesets.s3.cf < prev    next >
Encoding:
Text File  |  1996-08-04  |  1.4 KB  |  47 lines

  1. ###########################################
  2. ###  Rulset 3 -- Name Canonicalization  ###
  3. ###########################################
  4. S3
  5.  
  6. # handle null input (translate to <@> special case)
  7. R$@            $@ <@>
  8.  
  9. # Translate uucp stuff
  10. R$*!$*            $2@$1
  11.  
  12. # basic textual canonicalization -- note RFC733 heuristic here
  13. R$*<$*>$*<$*>$*        $2$3<$4>$5            strip multiple <> <>
  14. R$*<$*<$+>$*>$*        <$3>$5                2-level <> nesting
  15. R$*<>$*            $@ <@>                MAIL FROM:<> case
  16. R$*<$+>$*        $2                basic RFC821/822 parsing
  17.  
  18. # handle list:; syntax as special case
  19. R$*:;$*            $@ $1 :; <@>
  20.  
  21. # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
  22. R@ $+ , $+        @ $1 : $2            change all "," to ":"
  23.  
  24. # localize and dispose of route-based addresses
  25. R@ $+ : $+        $@ $>96 < @$1 > : $2        handle <route-addr>
  26.  
  27. # find focus for list syntax
  28. R $+ : $* ; @ $+    $@ $>96 $1 : $2 ; < @ $3 >    list syntax
  29. R $+ : $* ;        $@ $1 : $2;            list syntax
  30.  
  31. # find focus for @ syntax addresses
  32. R$+ @ $+        $: $1 < @ $2 >            focus on domain
  33. R$+ < $+ @ $+ >        $1 $2 < @ $3 >            move gaze right
  34. R$+ < @ $+ >        $@ $>96 $1 < @ $2 >        already canonical
  35.  
  36. # do some sanity checking
  37. R$* < @ $* : $* > $*    $1 < @ $2 $3 > $4        nix colons in addrs
  38.  
  39.  
  40. # if we have % signs, take the rightmost one
  41. R$* % $*        $1 @ $2                First make them all @s.
  42. R$* @ $* @ $*        $1 % $2 @ $3            Undo all but the last.
  43. R$* @ $*        $@ $>96 $1 < @ $2 >        Insert < > and finish
  44.  
  45. # else we must be a local name
  46.  
  47.